home *** CD-ROM | disk | FTP | other *** search
- Path: news.uh.edu!mwk!hossain
- From: hossain@mwk.com
- Newsgroups: comp.lang.c++
- Subject: Simple Question for the GURUs....
- Message-ID: <1996Mar21.093000.3545@mwk.com>
- Date: 21 Mar 96 09:30:00 CST
- Organization: M. W. Kellogg, Houston TX
-
- *** A stupid question for the GURUS ***
-
- I have a very simple problem. Should the following code work ?
-
- //File:myapp.c
-
- char *main(int argc, char *argv[])
- {
- char *temp = (char *)NULL;
-
- temp = (char *)malloc(40 * sizeof(char) );
-
- if ( temp ) strcpy(temp,"Hello World..!!");
-
- return(temp);
- }
-
-
- My intent is to have my myapp.exe return to me a string as it should do.
-
-
- The next part of my problem is I am setting a variable say ALPHA to the string
- coming out of this executable. I am doing this in a PERL script as follows:
-
- //File: myperl.cmd
- ..............
- ............
- @GREETINGS = `myapp.exe`;
- print "Greetings from the Master : @GREETINGS\n";
- ...........
- ..........
-
-
- I am doing this in Windows NT environment.The PERL script appear to hang at the
- line @GREETINGS = `myapp.exe`. What is the problem.
-
- I will appreciate a response from anyone, who can help solve this apparently
- simple problem. Please e-mail me directly at "hossain@mwk.com".
-
- Hoping to hear from someone there.
-
- thanks
- akhtar
-